package com.da.result;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * 生成接口响应对象
 *
 * @author da
 * @time 2024/7/3 上午 11:05
 */
public class MessageResult implements Result {
    private String model;
    private String created_at;
    private String response;
    private Boolean done;
    private String done_reason;
    private List<Long> context;
    private Long total_duration;
    private Long load_duration;
    private Long prompt_eval_count;
    private Long prompt_eval_duration;
    private Long eval_count;
    private Long eval_duration;

    @Override
    public String content() {
        return this.response;
    }

    public MessageResult() {
    }

    public MessageResult(String model, String created_at, String response, Boolean done, String done_reason, List<Long> context, Long total_duration, Long load_duration, Long prompt_eval_count, Long prompt_eval_duration, Long eval_count, Long eval_duration) {
        this.model = model;
        this.created_at = created_at;
        this.response = response;
        this.done = done;
        this.done_reason = done_reason;
        this.context = context;
        this.total_duration = total_duration;
        this.load_duration = load_duration;
        this.prompt_eval_count = prompt_eval_count;
        this.prompt_eval_duration = prompt_eval_duration;
        this.eval_count = eval_count;
        this.eval_duration = eval_duration;
    }

    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }

    public String getCreated_at() {
        return created_at;
    }

    public void setCreated_at(String created_at) {
        this.created_at = created_at;
    }

    public String getResponse() {
        return response;
    }

    public void setResponse(String response) {
        this.response = response;
    }

    public Boolean getDone() {
        return done;
    }

    public void setDone(Boolean done) {
        this.done = done;
    }

    public String getDone_reason() {
        return done_reason;
    }

    public void setDone_reason(String done_reason) {
        this.done_reason = done_reason;
    }

    public List<Long> getContext() {
        return context;
    }

    public void setContext(List<Long> context) {
        this.context = context;
    }

    public Long getTotal_duration() {
        return total_duration;
    }

    public void setTotal_duration(Long total_duration) {
        this.total_duration = total_duration;
    }

    public Long getLoad_duration() {
        return load_duration;
    }

    public void setLoad_duration(Long load_duration) {
        this.load_duration = load_duration;
    }

    public Long getPrompt_eval_count() {
        return prompt_eval_count;
    }

    public void setPrompt_eval_count(Long prompt_eval_count) {
        this.prompt_eval_count = prompt_eval_count;
    }

    public Long getPrompt_eval_duration() {
        return prompt_eval_duration;
    }

    public void setPrompt_eval_duration(Long prompt_eval_duration) {
        this.prompt_eval_duration = prompt_eval_duration;
    }

    public Long getEval_count() {
        return eval_count;
    }

    public void setEval_count(Long eval_count) {
        this.eval_count = eval_count;
    }

    public Long getEval_duration() {
        return eval_duration;
    }

    public void setEval_duration(Long eval_duration) {
        this.eval_duration = eval_duration;
    }

    @Override
    public String toString() {
        return "{" +
                "model='" + model + '\'' +
                ", created_at='" + created_at + '\'' +
                ", response='" + response + '\'' +
                ", done=" + done +
                ", done_reason='" + done_reason + '\'' +
                ", context=" + context +
                ", total_duration=" + total_duration +
                ", load_duration=" + load_duration +
                ", prompt_eval_count=" + prompt_eval_count +
                ", prompt_eval_duration=" + prompt_eval_duration +
                ", eval_count=" + eval_count +
                ", eval_duration=" + eval_duration +
                '}';
    }
}
